package lero.service.impl;

import lero.common.MD5Util;
import lero.mapper.ArticleMapper;
import lero.pojo.Article;
import lero.service.ArticleServiceI;
import lero.vo.ArticleVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;

import java.util.List;

/**
 * Created by Articleistrator on 2018/7/16.
 */
@Service
@Transactional
public class ArticleServiceImpl implements ArticleServiceI {

    @Autowired
    private ArticleMapper articleMapper;

    @Override
    public void insert(Article article) {
        articleMapper.insert(article);
    }

    @Override
    public List<Article> select(ArticleVo vo) {
        return articleMapper.select(vo);
    }

    @Override
    public Article selectOne(int id) {
        return articleMapper.selectOne(id);
    }

    @Override
    public void delete(int id) {
        articleMapper.delete(id);
    }

    @Override
    public void deleteMany(int[] ids) {
        articleMapper.deleteMany(ids);
    }

    @Override
    public void update(Article article) {
        articleMapper.update(article);
    }
}
